/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.market.web.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author ps
 */
@Embeddable
public class TempshoppingcartPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "CustID")
    private int custID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "Pid")
    private int pid;

    public TempshoppingcartPK() {
    }

    public TempshoppingcartPK(int custID, int pid) {
        this.custID = custID;
        this.pid = pid;
    }

    public int getCustID() {
        return custID;
    }

    public void setCustID(int custID) {
        this.custID = custID;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) custID;
        hash += (int) pid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TempshoppingcartPK)) {
            return false;
        }
        TempshoppingcartPK other = (TempshoppingcartPK) object;
        if (this.custID != other.custID) {
            return false;
        }
        if (this.pid != other.pid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.market.web.model.TempshoppingcartPK[ custID=" + custID + ", pid=" + pid + " ]";
    }
    
}
